<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	template="/pages/template/layoutBusca.xhtml">

<ui:define name="body">

	<h:form prependId="false">
	
		<h:panelGroup layout="block" id="pnlPesquisaEmpresaLista">
			
			<ui:repeat var="empresa" value="#{anuncioAction.empresaList}">
			
				<h:panelGroup layout="block" styleClass="anuncio">
					<h:panelGroup layout="block" styleClass="painelEsquerdo">
						<h:graphicImage value="/img/mini_icon_restaurante.png" />
					</h:panelGroup>
					<h:panelGroup layout="block" styleClass="painelCentro">
						<h:panelGroup layout="block" styleClass="dado">
							<h:commandLink action="#{anuncioAction.detalharAnuncio}" value="#{empresa.nomeFantasia}" >
								<f:param name="idEmpresa" value="#{empresa.id}" />
							</h:commandLink>
						</h:panelGroup>
						<h:panelGroup layout="block" styleClass="dado">
							<h:outputText value="#{empresa.endereco.logradouro}" />
						</h:panelGroup>
						<h:panelGroup layout="block" styleClass="dado">
							<h:outputText value="#{empresa.endereco.bairro.nome}, DF | #{empresa.endereco.cep}" />
						</h:panelGroup>
						<ui:repeat var="tel" value="#{empresa.telefoneList}">
							<h:panelGroup layout="block" styleClass="dado">
								<h:outputText value="(#{tel.ddd}) #{tel.telefone}" />
							</h:panelGroup>
						</ui:repeat>
						<h:panelGroup layout="block" styleClass="dado">
							<h:outputLink value="#{empresa.site}" target="_blank">
								<h:graphicImage value="/img/btn_site.png" />
							</h:outputLink>
						</h:panelGroup>
					</h:panelGroup>
					<h:panelGroup layout="block" styleClass="painelDireito">
						<h:graphicImage value="/img/icon_empresa_teste.png" />
					</h:panelGroup>
				</h:panelGroup>
				
				<h:panelGroup layout="block" styleClass="separatorAnuncio">
					<p:spacer height="20" />
				</h:panelGroup>
				
			</ui:repeat>
		
		</h:panelGroup>
		
		<h:panelGroup layout="block" styleClass="clearAll"></h:panelGroup>
	
	</h:form>
	
</ui:define>

</ui:composition>